package org.itrip.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.itrip.dao.impl.WebSiteDAO;
import org.itrip.entity.WebSite;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 涛 on 2016/3/17.
 */
@Service
public class WebSiteService {
    private static Log log = LogFactory.getLog(WebSiteService.class.getName());

    @Resource
    private WebSiteDAO dao;

    public void listAll() {
        log.debug("查询结果如下:");
        List<WebSite> list = dao.queryAll();
        for (WebSite ws : list)
            System.out.println(ws.getUrl());
    }

}
